/* 字体设置样式 */
.font-setting-group {
  margin-bottom: 32px;
}

.font-setting-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text-primary);
  margin-bottom: 16px;
}

/* 字体族网格 */
.font-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.font-family-card {
  background: var(--theme-bg-secondary);
  border: 2px solid var(--theme-border-light);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.font-family-card:hover {
  border-color: var(--theme-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.font-family-card.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.font-family-preview {
  margin-bottom: 12px;
  padding: 8px;
  background: var(--theme-bg-primary);
  border-radius: 8px;
  text-align: center;
}

.font-preview-text {
  font-size: 16px;
  color: var(--theme-text-primary);
}

.font-family-info {
  text-align: center;
}

.font-family-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--theme-text-primary);
  margin-bottom: 4px;
}

.font-family-description {
  font-size: 12px;
  color: var(--theme-text-secondary);
}

.font-family-check {
  position: absolute;
  top: 8px;
  right: 8px;
  background: white;
  border-radius: 50%;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 字号设置卡片 - 全新设计 */
.font-size-card {
  background: var(--theme-bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--theme-border-light);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 18px;
}

/* 顶部控制区 - 左右布局 */
.font-size-top-section {
  display: flex;
  gap: 32px;
  align-items: center;
}

/* 左侧滑块区域 */
.font-size-slider-area {
  flex: 2;
  min-width: 300px;
}

/* 右侧预览区域 */
.font-size-preview-area {
  flex: 1;
  min-width: 180px;
}

/* 滑块样式 */
.font-size-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--theme-bg-tertiary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.font-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--theme-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.font-size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.font-size-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--theme-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.font-size-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 10px;
}

.font-size-mark {
  font-size: 12px;
  color: var(--theme-text-secondary);
  font-weight: 500;
}

/* 预览显示区域 */
.preview-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: var(--theme-bg-primary);
  border-radius: 12px;
  border: 1px solid var(--theme-border-light);
}

.preview-info {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.current-size {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-primary);
}

.size-unit {
  font-size: 12px;
  color: var(--theme-text-secondary);
  font-weight: 500;
}

.preview-char {
  color: var(--theme-text-primary);
  font-weight: 500;
  text-align: center;
}

/* 字号预设按钮 */
.font-size-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 间距设置统一样式 */
.spacing-setting-group {
  margin-bottom: 24px;
}

.spacing-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spacing-slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--theme-bg-tertiary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.spacing-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--theme-primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.spacing-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spacing-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--theme-primary);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.spacing-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.spacing-value {
  width: 64px;
  text-align: right;
  color: var(--theme-text-secondary);
  font-weight: 600;
  font-size: 14px;
}

.font-size-preset-btn {
  padding: 8px 16px;
  border: 2px solid var(--theme-border-light);
  border-radius: 8px;
  background: var(--theme-bg-secondary);
  color: var(--theme-text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.font-size-preset-btn:hover {
  border-color: var(--theme-primary);
  background: var(--theme-primary-light);
}

.font-size-preset-btn.active {
  border-color: var(--theme-primary);
  background: var(--theme-primary);
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .font-size-top-section {
    flex-direction: column;
    gap: 20px;
  }
  
  .font-size-slider-area {
    min-width: auto;
    width: 100%;
  }
  
  .font-size-preview-area {
    min-width: auto;
    width: 100%;
  }
  
  .font-family-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}
